<?php
session_start();
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Schools Management System</title>
<meta http-equiv="Content-Language" content="English" />
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="../style.css" media="screen" />

</head>
<body>
<?php
require_once '../Login/databaseconnection.php';
if(!loggedin())
{
require_once '../index.php';
}
else
{
	if(isset($_POST['Register']))
{
	
$Pro_Id=$_POST['Pro_Id'];
   $Year=$_POST['Year'];
 $Sch_Id=$_POST['Sch_Id'];
    $Pro_name=$_POST['Pro_name'];
    $No_Stu=$_POST['No_Stu'];
    $No_Tra_tea=$_POST['No_Tera_tea'];
    $Tra_tea=$_POST['Tra_tea'];
    $Avai_Book=$_POST['Avai_Book'];
   $Avai_Tea_Gui=$_POST['Avai_Tea_Gui'];
    
   require_once 'REG.php';
}
/*
if($Pro_Id!=" "&&$Year!=" "&&$Sch_Id!=" "&&$Pro_name!=" "&&$No_Stu!=" "&&$No_Tra_tea!=" "&&$Tra_tea!=" ")
	{
	require_once 'REG.php';
	}
	if($Pro_Id==" "||$Year==" "||$Sch_Id==" "||$Pro_name==" "||$No_Stu==" "||$No_Tra_tea==" "||$Tra_tea==" ")
	{
		$_SESSION['errorin']="Please fill all!";
	}*/
	
?>
	
<div id="wrap">

<div id="header">
<table width="1239" border="0">
  <tr>
    <td width="851" height="119" rowspan="2"><h1 class="heaaderte"><font color="#996699" style="text-shadow:#969" size="+6">Schools Management System</font></h1></td>
    <td width="141" height="88">&nbsp;</td>
    <td width="148">&nbsp;</td>
    <td width="81">&nbsp;</td>
  </tr>
  <tr>
    <td height="21">
    <?Php
	//$First_Name=$_SESSION['First_Name'];
    //$_SESSION['Last_Name']=$Last_Name;
	  if(isset($_SESSION['First_Name']))
	  
{
      echo $_SESSION['First_Name'];
}
?>
</td>
    <td>
	<?Php
	
	  if(isset($_SESSION['Last_Name']))
	  
{
      echo $_SESSION['Last_Name'];
}
?></td>
    <td><a href="../Logout.php" class="logout">Logout</a></td>
  </tr>
  </table>
</div>

<div id="menu1_bg">
		<div id="menu1">
			
	
			<ul>
				<li><a href="../index.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Home</font></a></li>
				<li><a href="../Schools/Schools.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Schools</font></a></li>
				<li><a href="../Teachers/teachers.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Teachers</font></a></li>
				<li><a href="../Lab/Labs.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Labs</font></a></li>
				<li><a href="../Resources/Resources.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Resources</font></a></li>
                <li><a href="#"><font color="#CCCC66" style="text-shadow:#969" size="+1">Resource Team</font></a></li>
                         <li><a href="Programmes.php" class="active"><font color="#CCCC66" style="text-shadow:#969" size="+1">Programmes</font></a></li>
                                  <li><a href="../Competition/Competition.php"><font color="#CCCC66" style="text-shadow:#969" size="+1">Competitions</font></a></li>
                 <li></li>
			</ul>
	</div>
  </div>
<div class="left">
  
<div class="articles">
  
  <form action="#" method="POST">
  <table width="1230" height="388" border="0">
    <tr>
      <th height="25" colspan="3"  scope="row"><?php
		if(isset($_POST['Register']))
{
	if(isset($_SESSION['errorin']))
	{
		echo $_SESSION['errorin'];
		unset($_SESSION['errorin']);
	}
	if(isset($_SESSION['error']))
	{
		echo $_SESSION['error'];
		unset($_SESSION['error']);
		
	}
}
		?></th>
      <td width="522" rowspan="10">&nbsp;</td>
    </tr>
    <tr>
      <th width="18"  scope="row">&nbsp;</th>
      <th width="206" height="36"  scope="row" bgcolor="#936"><p>&nbsp;</p>
        
        
        Programme Id:</th>
      <td width="466"><input type="text" name="Pro_Id" /></td>
      </tr>
    <tr>
      <th scope="row">&nbsp;</th>
      <th height="31" scope="row" bgcolor="#936">Year:</th>
      <td><input type="text" name="Year" /></td>
      </tr>
    <tr>
      <th scope="row">&nbsp;</th>
      <th height="33" scope="row" bgcolor="#936">Programme Name:</th>
      <td><input type="text" name="Pro_name" /></td>
      </tr>
    <tr>
      <th scope="row">&nbsp;</th>
      <th height="45" scope="row" bgcolor="#936">School Id: </th>
      <td><input type="text" name="Sch_Id" /></td>
      </tr>
    <tr>
      <th scope="row">&nbsp;</th>
      <th height="31" scope="row" bgcolor="#936">Number of students:</th>
      <td><input type="text" name="No_Stu" /></td>
      </tr>
    <tr>
      <th scope="row">&nbsp;</th>
      <th height="36" scope="row" bgcolor="#936">Number of teachers in training: </th>
      <td><input type="text" name="No_Tera_tea" /></td>
      </tr>
    <tr>
      <th scope="row">&nbsp;</th>
      <th height="41" scope="row" bgcolor="#936">Number of trained teachers: </th>
      <td><input type="text" name="Tra_tea" /></td>
      </tr>
    <tr>
      <th scope="row">&nbsp;</th>
      <th height="44" scope="row" bgcolor="#936">Availability of books: </th>
      <td><p>
        <label>
          <input type="radio" name="Avai_Book" value="Yes" />
          Yes</label>
        <br />
        <label>
          <input type="radio" name="Avai_Book" value="No" />
          No</label>
        <br />
      </p></td>
      </tr>
    <tr>
      <th scope="row">&nbsp;</th>
      <th height="44" scope="row" bgcolor="#936">Availability  of teachers guides: </th>
      <td><label>
        <input type="radio" name="Avai_Tea_Gui" value="Yes" />
        Yes</label>
        <br />
        <label>
          <input type="radio" name="Avai_Tea_Gui" value="No" />
          No</label></td>
      </tr>
  </table>
  <br/>
   <a href="RegPro.php">Reset</a>|
  <input name="Register" align="middle" type="submit" value="Register" />
 </form>
</div>
</div>

<div class="rightmenu"> 
<h1>PROGRAMMES</h1><br />
<table width="220" border="0">
  <tr>
    <td width="210" height="41"><a href="RegPro.php">Add New Programme</a></td>
   

  </tr>
  <tr>
    <td height="41"><a href="SearchPro.php">Search a Programme</a></td>
    
    
  </tr>
  <tr>
    <td height="41"><a href="SearchProSch.php">Search Programmes for a school</a></td>

    
  </tr>
  <tr>
    <td height="41"><a href="UpdateProSch.php">Update a Programme of a School</a></td>
 
    
  </tr>
  <tr>
    <td height="41"><a href="DelPro.php">Delete a Programme of a School</a></td>
    
    
  </tr>
  <tr>
    <td height="41"><a href="Viewall.php">View All</a></td>
   

  </tr>
</table></div>
 
 <div style="clear: both;"> </div>


<div id="footer"><table width="1236" height="38" border="0">
    <tr>
      <td width="904" height="34">Schools Managemrnt System &copy; 2012 </td>
      <td width="50"><strong><a href="#" class="active">Home</a><a href="#"></a></strong>|</td>
      <td width="80"><strong><a href="#" class="active">Contact Us</a></strong>|</td>
      <td width="40"><a href="http//www.facebook.com"><img src="../images/facebook1.png" width="38" height="38"/></a></td>
      <td width="38"><a href="http//twitter.com"><img src="../Images/twitter.png" width="38" height="38"/></a></td>
      <td width="36"><a href="http//www.google.lk"><img src="../Images/google.png" width="38" height="38"/></a><a href=""http="http"//www.yahoo.com""></a></td>
      <td width="58"><a href=""http="http"//www.yahoo.com""><img src="../Images/yahoo.png" alt="" width="38" height="38"/></a></td>
    </tr>
  </table>
</div>
</div>

<?php

	}
?>
</body>
</html>